package com.gumbo.bookmanager.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Record {
    private long sernum;
    private long bookId;
    private int readerId;
    private String bookName;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String lendDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String backDate;

    public Record(long bookId, int readerId, String lendDate, String backDate, String bookName){
        this.bookId = bookId;
        this.readerId = readerId;
        this.lendDate = lendDate;
        this.backDate = backDate;
        this.bookName = bookName;
    }

}
